<?php
$this->breadcrumbs=array(
	'Manage Subscription',
);

/*
$this->menu=array(
	array('label'=>'List CafeOwnerSubscribe', 'url'=>array('index')),
	array('label'=>'Create CafeOwnerSubscribe', 'url'=>array('create')),
);
*/

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('cafe-owner-subscribe-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Cafe Subscriptions</h1>
<?php 
/*
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->
*/
?>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'cafe-owner-subscribe-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'name'=>'id',
			'filter'=>false,
		),
		array(
			'name'=>'shopId',
			'value'=>'$data->shop->name',
		),
		//'txn_id',
		array(
			'name'=>'startDate',
			'type'=>'date',
			'filter'=>false,
		),
		array(
			'name'=>'endDate',
			'type'=>'date',
			'filter'=>false,
		),
		array(
			'header'=>'Owner',
			'value'=>'$data->shop->owner->username',
			'filter'=>false,
		),
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update} {delete}',
		),
	),
)); ?>
